<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="p" %>
<%String ctx = request.getContextPath(); %>

<jsp:include page="../common/operate.jsp">
	<jsp:param name="title1" value="职位列表"/>
	<jsp:param name="title2" value=""/>
	<jsp:param name="isShowAddBtn" value="true"/>
	<jsp:param name="isShowUpdateBtn" value="true"/>
	<jsp:param name="isShowDeleteBtn" value="true"/>
</jsp:include>

<script type="text/javascript">
    function deletePosition(id){
        if(confirm("是否确认删除该职位？若删除，所有下属职位也将删除。")){
            window.location="position!delete.action?id="+id ;
        } 
    }
</script>

    <div style="width:98%" class="f_l margin1">
    <table width="98%" cellspacing="0" cellpadding="0" border="0" class="clear f_l padding3" id="tb">
      <tr class="bg4_nav">
      	<td width="6%" style="border:0">
			<input onclick="javascript:batchSelect(this)" type="checkbox" style="border:0" name="List_Selected2">
		</td>
        <td class="t_c" style="border:0">
                           职位编号
        </td>
        <td class="t_c" style="border:0">
                          职位名称
        </td>
        <td class="t_c" style="border:0">
                          上级名称
        </td>
        <td class="t_c" style="border:0">
                          公司
        </td>
      </tr>
    <s:iterator value="pager.result" status="status">
      <tr onmouseover="this.bgColor='#F2E6E6'" onmouseout="this.bgColor=''">
      	<td class="border_tb">
       		<input type="checkbox" style="border:0" name="ids" value="${id }">
       </td>
        <td class="border_tb">
          &nbsp;<s:property value="positionNo"/>
        </td>
        <td class="border_tb">
          &nbsp;<s:property value="name"/>
        </td>
        <td class="border_tb">
          &nbsp;<s:property value="superiorName"/>
        </td>
        <td class="border_tb">
          &nbsp;<s:property value="companyName"/>
        </td>
      </tr>
     </s:iterator>
     </table> 
    </div>
<script type="text/javascript">
$(window).ready(function(){
	addOperate('addButton','<%=ctx%>/position/position!add');
	updateOperate('updateButton','<%=ctx%>/position/position!edit');
	batchDelete('deleteButton','listForm','<%=ctx%>/position/position!deleteAll');
	isAllSelected('listForm');	
});
</script>
